import {
  Component,
  HostBinding,
  Input,
  OnInit
} from '@angular/core';

import { ApesRadioComponent } from './apes-radio.component';

@Component({
  selector           : '[apes-radio-button]',
  preserveWhitespaces: false,
  template           : `
    <span [ngClass]="classMap">
      <input type="radio" #inputElement class="{{prefixCls}}-input" [disabled]="apesDisabled" [(ngModel)]="apesChecked" (blur)="onBlur()" [attr.name]="name">
      <span class="{{prefixCls}}-inner"></span>
    </span>
    <span><ng-content></ng-content></span>
  `,
  host               : {
    '[class.apes-radio-button-wrapper]'         : 'true',
    '[class.apes-radio-button-wrapper-checked]' : 'apesChecked',
    '[class.apes-radio-button-wrapper-disabled]': 'apesDisabled'
  }
})
export class ApesRadioButtonComponent extends ApesRadioComponent implements OnInit {
  prefixCls = 'apes-radio-button';
}
